﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

using BFTest;
using BFTest.Ammunitions;

namespace BFTest.Classes
{
    class CAssaultman : CShootingClass
    {
        public override Color ClassColor { get { return Color.Turquoise; } }
        public override int MaxHealth { get { return 80; } }
        private float size = 6f;
        public override float Size { get { return size; } }
        public override string ClassName { get { return "Assaultman"; } }
        public override TimeSpan RateOfFire { get { return TimeSpan.FromSeconds(3); } }
        public override int FireChance { get { return 90; } }
        float accuracy = MathHelper.ToRadians(4);
        public override float Accuracy { get { return accuracy; } }
        public override int MagSize { get { return 1; } }
        public override TimeSpan TimeToReload { get { return TimeSpan.FromSeconds(8); } }

        public CAssaultman(int id, Vector2 position, string soldierName, UnitRank rank, int side, Texture2D texture)
            : base(id, position, soldierName, rank, side, texture)
        {
            this.Initialize();
        }

        protected override void Initialize()
        {
            base.Initialize();
        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
        }

        public override void Draw(SpriteBatch spriteBatch)
        {
            base.DrawBefore(spriteBatch);
            base.Draw(spriteBatch);
            base.DrawAfter(spriteBatch);
        }

        public override void Shoot(Vector2 direction)
        {
            BFTestGame.ActiveBullets.Bullets.Add(BFTestGame.ActiveBullets.BulletFactory(BulletType.Rocket, ID, Position, direction, "rocket"));
            RoundsInMag -= 1;
        }
    }
}
